Ext.regModel('Settings', {
    fields: [
        { name: 'id', type: 'int'},
        { name: 'login', type: 'string' },
        { name: 'password', type: 'password' }
    ],
    proxy: {
        type: 'localstorage',
        id  : 'iOrders'
    }
});

var settingsStore = new Ext.data.Store({
    model: 'Settings',
    autoLoad: false,    
    listeners: {
        load: function(store) {
        	var record = store.getById(1);
            if (!record) {
                store.add({id:1});
                record = store.getById(1);
            } else {
                dataSync.setCredentials(record);
            }
            IOrders.views.SettingsView.load(record);
        }
    }
});